home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / vis082s.arc / MAIN.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-17  |  5KB  |  227 lines

  1.  
  2. {$R-,S-,I-,D-,F+,V-,B-,N-,L+ }
  3.  
  4. unit main;
  5.  
  6. interface
  7.  
  8. uses crt,
  9.      windows,gentypes,modem,gensubs,subs1,subs2,userret,overret1,mainr2,
  10.      bulletin,configur,database,doors,email,gamble,filexfer,mycomman,voting,
  11.      mainmenu,others;
  12.  
  13. procedure mainsysopcommands;
  14. procedure mainmenuproc;
  15. procedure breakout;
  16.  
  17. implementation
  18.  
  19. procedure mainsysopcommands;
  20. var q:integer;
  21. begin
  22.     if not getsysoppwd then begin
  23.          Inc(HackAttempts);
  24.          DoHackShit;
  25.          exit;
  26.          end;
  27.   repeat
  28.         q:=menu ('Sysop','SYSOP','QTEANDUCIJSKVMFRZPLB*');
  29.         case q of
  30.             2:editoldspecs;
  31.             3:readerrlog;
  32.             4:addnews;
  33.             5:editnews;
  34.             6:delerrlog;
  35.             7:editusers;
  36.             8:settime;
  37.             9:infoformhunt;
  38.             10:showallforms;
  39.             11:viewsyslog;
  40.             12:delsyslog;
  41.             13:showallsysops;
  42.             14:makeuser;
  43.             15:readfeedback;
  44.             16:removeallforms;
  45.             17:zapspecifiedusers;
  46.             18:localconfiguration;
  47.             19:Loozerlists;
  48.             20:nodelists;
  49.             21:RemoteDosShell;
  50.         end
  51.     until (q=1) or hungupon
  52. end;
  53.  
  54. procedure mainmenuproc;
  55. var q,z:integer;
  56. {   mnu:menutype;      Pull down menus commented out.
  57.     topmnu:lrmenutype;  }
  58. begin
  59. {
  60.   topmnu[1]:='Go Somewhere';
  61.   topmnu[2]:='The BBS';
  62.   topmnu[3]:='Other';
  63.   topmnu[4]:='';
  64.                  }
  65.   repeat
  66.     if fromdoor and (returnto='D') then doorsmenu;
  67.     cursection:=mainsysop;
  68.   {  if urec.avatar=0 then } randomrumor;
  69. {  if urec.avatar<>0 then begin
  70.     z:=lrmenu (topmnu,4*16+15,1*16+15);
  71.     case z of
  72.       1:begin
  73.           mnu[1]:='About BBS';
  74.           mnu[2]:='Messages';
  75.           mnu[3]:='Databases';
  76.           mnu[4]:='E-Mail';
  77.           mnu[5]:='User Config';
  78.           mnu[6]:='File Section';
  79.           mnu[7]:='BBS List';
  80.           mnu[8]:='Rumor Lists';
  81.           mnu[9]:='Ansi Art';
  82.           mnu[10]:='Infoforms';
  83.           mnu[11]:='Timebank';
  84.           mnu[12]:='Voting Booths';
  85.           mnu[13]:='G-Files';
  86.           mnu[14]:='On-Line Doors';
  87.           mnu[15]:='Conferences';
  88.           mnu[16]:='';
  89.           q:=pulldown (mnu,2*16,15,14,2,30,18,1);
  90.           case q of
  91.             1:aboutthisbbs;
  92.             2:bulletinmenu;
  93.             3:datamenu;
  94.             4:emailmenu;
  95.             5:configure;
  96.             6:udsection;
  97.             7:otherbbs;
  98.             8:rumour;
  99.             9:showscreens;
  100.            10:infoform (callforms);
  101.            11:timebanks;
  102.            12:votingbooth (false);
  103.            13:gfilesection;
  104.            14:doorsmenu;
  105.            15:JumpConference;
  106.           end;
  107.         end;
  108.       2:begin
  109.           mnu[1]:='List Users';
  110.           mnu[2]:='Recent Calls';
  111.           mnu[3]:='Leave Feedback';
  112.           mnu[4]:='Chat W/Sysop';
  113.           mnu[5]:='Read News';
  114.           mnu[6]:='Donation Info';
  115.           mnu[7]:='Leech List';
  116.           mnu[8]:='System Stats';
  117.           mnu[9]:='Modem Stats';
  118.           Mnu[10]:='Top 10 Lists';
  119.           mnu[11]:='';
  120.           q:=pulldown (mnu,2*16,15,40,2,57,13,1);
  121.           case q of
  122.             1:listusers;
  123.             2:showlastcallers;
  124.             3:feedback;
  125.             4:summonsysop;
  126.             5:printnews;
  127.             6:donations;
  128.             7:leechlist;
  129.             8:showsystemstatus;
  130.             9:modemstatus;
  131.           end;
  132.         end;
  133.       3:begin
  134.           mnu[1]:='Get Help';
  135.           mnu[2]:='Change PW';
  136.           mnu[3]:='Raise Req';
  137.           mnu[4]:='Newscan Date';
  138.           mnu[5]:='ViSiON Ad';
  139.           mnu[6]:='Your Status';
  140.           mnu[7]:='Log Off';
  141.           mnu[8]:='';
  142.           q:=pulldown (mnu,2*16,15,60,2,75,10,1);
  143.           case q of
  144.             1:mainhelp;
  145.             2:changepwd;
  146.             3:requestraise;
  147.             4:setlastcall;
  148.             5:showad;
  149.             6:showuserstats(urec);
  150.             7:offtheforum;
  151.           end;
  152.         end;
  153.      end;   }
  154.     {q:=pulldown (mnu,31,15,1,1,20,18,1);}
  155.    { End Else} Begin
  156.     q:=menu ('Main','MAIN','AMCDEFGHIJKLBNOPQRSTUVWXYZ+-!&$%*^.=/');
  157.     writeln;
  158.     case q of
  159.       1:game;
  160.       2:Begin JumpConference; bulletinmenu; End;
  161.       3:summonsysop;
  162.       4:datamenu;
  163.       5:emailmenu;
  164.       6:feedback;
  165.       7:offtheforum;
  166.       15:newvotex;
  167.       8:mainhelp;
  168.       9:get_infoform;
  169.       10:JumpConference;
  170.       11:Begin configure; ClearScr; End;
  171.       12:listusers;
  172.       13:otherbbs;
  173.       14:printnews;
  174.       16:doorsmenu;
  175.       17:leechlist;
  176.       18:rumormenu;
  177.       19:showsystemstatus;
  178.       20:Begin JumpConference; udsection; End;
  179.       21:Timebanks;
  180.       22:votingbooth (false);
  181.       23:showlastcallers;
  182.       24:transfername;
  183.       25:showuserstats(urec);
  184.       26:setlastcall;
  185.       27:changepwd;
  186.       28:TopTen(0);
  187.       30:showad;
  188.       31:donations;
  189.       32:mainsysopcommands;
  190.       33:showscreens;
  191.       34:MyCommand;
  192.       35:Begin
  193.          clearscr;
  194.          writeln(^P'This BBS is registered to :'^R,registo);
  195.          writeln(^P'The BBS Name is           :'^R,registb);
  196.       end;
  197.       37:DisplayNodeInfo;
  198.     end;
  199.     End;
  200.   until hungupon
  201. end;
  202.  
  203. {$F+}
  204.  
  205. procedure breakout;
  206. begin
  207.   if (erroraddr=nil) and (exitcode=e_controlbreak) then begin
  208.     textattr:=7;
  209.     updateuserstats (false);
  210.     writeln (direct,' [ System Break ]');
  211.     writereturnbat;
  212.     ensureclosed;
  213.     window (1,1,80,25);
  214.     gotoxy (1,25); clreol;
  215.     gotoxy (1,24); clreol;
  216.     if not carrier then dontanswer;
  217.   end;
  218.   doneexitproc
  219. end;
  220.  
  221. {$F+}
  222.  
  223. begin
  224.   addexitproc (@breakout)
  225. end.
  226.  
  227.